//创建一个计时函数，向指定HTML位置输出当前时间
function timer() {
	//创建一个date对象
	var date = new Date();
	// 获取相应时间
	var year = date.getFullYear();
	var mon = date.getMonth();
	var day = date.getDate();
	var week = date.getDay();
	var hh = date.getHours();
	var mm = date.getMinutes();
	var ss = date.getSeconds();
	var time = document.getElementById("content_bottom");
	
	// 判断是否大于10，输出正确格式
	if(ss < 10){
		sss = "0"+ss;
	}else{
		sss = ss;
	}
	if(mm < 10){
		mmm = "0"+mm;
	}else{
		mmm = mm;
	}
	if(hh < 10){
		hhh = "0"+hh;
	}else{
		hhh = hh;
	}
	if(day < 10){
		da = "0"+day;
	}else{
		da = day;
	}
	if(mon < 10){
		mo = "0"+mon;
	}else{
		mo = mon;
	}
	
	time.innerHTML = year + "年" + mo + "月" + da + "日" + "  " + hhh + ":" + mmm + ":" + sss + "  星期" + week;
	// setTimeout方法只执行一次
	setTimeout("timer()", 1000);
}
timer();
// 创建定时器每秒输出一次时间，可执行多次
//setInterval("timer()", 1000);